public class solutionApproval {
{
// Insert a solution

Solution s = new Solution(SolutionName='Test');

insert s;

// Create an approval request for the solution
Approval.ProcessSubmitRequest req1 = new Approval.ProcessSubmitRequest();
req1.setComments('Submitting request for approval.');
req1.setObjectId(s.id);

// Submit the approval request for the solution
Approval.ProcessResult result = Approval.process(req1);

// Verify the result
System.assert(result.isSuccess());

System.assertEquals('Pending', result.getInstanceStatus(), 'Instance Status'+result.getInstanceStatus());
}
}